package com.dycx.food.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 订单类型
 */
@Getter
@AllArgsConstructor
public enum SpecTypeEnum {

    SPEC(1, "规格", "primary"),
    PARAM(2, "参数", "success");

    private final Integer code;
    private final String name;
    private final String style;

    public static SpecTypeEnum getCode(Integer code) {
        for (SpecTypeEnum enums : SpecTypeEnum.values()) {
            if (enums.getCode().equals(code)) {
                return enums;
            }
        }
        return null;
    }
}
